Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 8 Forum

Notes/Domino 8 Forum

Previous Next
Subject: OutOfMemoryError: Notes-JavaAgent running on domino server
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Crash
Platform: Windows 2003 server
Release: 8.0
Reproducible: -Reproducibility-


Hi,
I'm starting an java-agent in notes. This agent searches in the content manager for archived emails.
After 5 searches I get the following error:

12/08/2009 11:21:51 AM Agent error: java.lang.OutOfMemoryError
12/08/2009 11:21:51 AM Agent error: at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:116)
12/08/2009 11:21:51 AM Agent error: at lotus.domino.ClassHashtable.explodeArchive(Unknown Source)
12/08/2009 11:21:51 AM Agent error: at lotus.domino.ClassHashtable.addAttachment(Unknown Source)
12/08/2009 11:21:51 AM Agent error: at lotus.domino.AgentLoader.addAttachment(Unknown Source)
12/08/2009 11:21:51 AM JVM: The addAttachment (Ljava/lang/String;[B)V() method failed.

I don't know what the problem is.
I start my agent within an notesagent like this:

Dim searchAgent As NotesAgent
Set searchAgent = db.GetAgent("(SearchAgent)")
Dim status As Integer
status = searchAgent.RunOnServer(profileDoc.NoteID)


And the search Agent looks like this:

public void NotesMain() {
Database db = null;
AgentContext agentContext = null;
Agent agent = null;
Document profileDoc = null;
String noteid = null;
String strDatabase = null;
String strUsername = null;
String strPasswd = null;
String query = null;
try {
session = getSession();
agentContext = session.getAgentContext();
db = agentContext.getCurrentDatabase();
agent = agentContext.getCurrentAgent();

noteid = agent.getParameterDocID();
agent.recycle();
profileDoc = db.getDocumentByID(noteid);

query = profileDoc.getItemValueString("searchQuery");
if(query == null){
return;
}

dsICM = new DKDatastoreICM();
dsICM.connect(strDatabase, strUsername, strPasswd,"");
int foundDocs = searchInContentManager(query, profileDoc, db);

profileDoc.recycle();
db.recycle();
session.recycle();

dsICM.clearCache(DKConstant.DK_CM_CLEAR_CACHE_ALL);

dsICM.disconnect();
dsICM.destroy();
System.out.println("Disconnected from datastore");

} catch(NotesException e) {
e.printStackTrace();
} catch (DKException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally{
try{
if(session != null) session.recycle();
if(db != null) db.recycle();
if(agentContext != null) agentContext.recycle();
if(agent != null) agent.recycle();
if(profileDoc != null) profileDoc.recycle();

} catch(NotesException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}


My JavaMaxHeapSize in the notes.ini from the Dominoserver has the value 384MB
I clear all Java-Objects, if possible.

What can I do that I don't get this error again?
Please help me!


Feedback number WEBB7YJGQ9 created by ~Julia Desboosisononi on 12/08/2009






Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS